package com.amoyt.dao;

import com.amoyt.model.AddressModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AddressDao {
    int deleteByPrimaryKeyAndUser(@Param("id") Long id,@Param("userId") Long userId);

    int insert(AddressModel record);

    int insertSelective(AddressModel record);

    AddressModel selectByPrimaryKey(@Param("id") Long id);

    List<AddressModel> getAddressByUser(@Param("userId") Long userId);

    List<AddressModel> getDefaultAddress(@Param("userId") Long userId);

    int updateByPrimaryKeySelective(AddressModel record);

    int updateByUserIdSelective(AddressModel record);

    int updateByPrimaryKey(AddressModel record);
}